package com.google.gwt.maps.v3.client.streetview;

import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.maps.v3.client.base.HasLatLng;
import com.google.gwt.maps.v3.client.base.LatLng;
import com.google.gwt.maps.v3.client.streetview.impl.StreetViewLocationImpl;

public class StreetViewLocation implements HasStreetViewLocation {

  protected final JavaScriptObject jso;
  
  private static final StreetViewLocationImpl impl = StreetViewLocationImpl.impl;
  
  public StreetViewLocation(final JavaScriptObject jso) {
    this.jso = jso;
  }
  
  public StreetViewLocation() {
    this(impl.construct());
  }

  @Override
  public String getDescription() {
    return impl.getDescription(jso);
  }

  @Override
  public HasLatLng getLatLng() {
    return new LatLng(impl.getLatLng(jso));
  }

  @Override
  public String getPano() {
    return impl.getPano(jso);
  }

  @Override
  public void setDescription(String description) {
    impl.setDescription(jso, description);
  }

  @Override
  public void setLatLng(HasLatLng latLng) {
    impl.setLatLng(jso, latLng.getJso());
  }

  @Override
  public void setPano(String pano) {
    impl.setPano(jso, pano);
  }

  @Override
  public JavaScriptObject getJso() {
    return jso;
  }

}
